$OpenBSD: patch-pgcluu,v 1.3 2016/05/02 09:28:27 jasper Exp $

- Set $sysinfo{"KERNEL"} and $sysinfo{"CPU"} (minus cache) values

--- pgcluu.orig	Wed Apr 27 15:43:05 2016
+++ pgcluu	Mon May  2 11:27:39 2016
@@ -9489,13 +9489,13 @@ sub read_sysinfo
 			next;
 		}
 		if ($section eq 'CPU') {
-			my ($key, $val) = split(/\s+:\s+/, $l);
-			if ($key eq 'processor') {
-				$sysinfo{$section}{$key} = $val + 1;
-			} elsif ($key eq 'model name') {
-				$val =~ s/\s+\@\s+(.*)$//;
-				$sysinfo{$section}{'cpu MHz'} = $1;
-				$sysinfo{$section}{$key} = $val;
+			my ($key, $val) = split(/=/, $l);
+			if ($key eq 'hw.ncpu') {
+				$sysinfo{$section}{'processor'} = $val;
+			} elsif ($key eq 'hw.model') {
+				$sysinfo{$section}{'model name'} = $val;
+			} elsif ($key eq 'hw.cpuspeed') {
+				$sysinfo{$section}{'cpu MHz'} = $val;
 			} else {
 				$sysinfo{$section}{$key} = $val;
 			}
@@ -9503,8 +9503,8 @@ sub read_sysinfo
 		if ($section eq 'KERNEL') {
 			my @kinf = split(/\s+/, $l);
 			$sysinfo{$section}{'hostname'} = $kinf[1];
-			$sysinfo{$section}{'kernel'} = "$kinf[0] $kinf[2] $kinf[3] $kinf[4]";
-			$sysinfo{$section}{'arch'} = "$kinf[-2] $kinf[-1]";
+			$sysinfo{$section}{'kernel'} = "$kinf[2] $kinf[3]";
+			$sysinfo{$section}{'arch'} = "$kinf[-1]";
 		}
 		if ($section eq 'UPTIME') {
 			$sysinfo{$section}{'all'} = $l;
